import React, { Component } from 'react';
import { BrowserRouter, Route, Link } from 'react-router-dom';
import './login.css';
import Pic from '../../../images/icon/login.png';
import BasicInputExampleWrapper from './loginBtn'
// 输入框
import { List, InputItem, WhiteSpace } from 'antd-mobile';

import { Button, WingBlank } from 'antd-mobile';

class Login extends Component {
  constructor() {
    super()
    this.state = {
      code: 0,
      userName: "",
      passWord: ""
    }
  }

  info(val) {
    console.log(val)
    this.setState({
      userName: val.userName,
      passWord: val.pwd
    })

  }
  render() {
    return (
      <div id="main">
        <img className="title" src={Pic} alt="" />
        <h2>登陆</h2>
        <BasicInputExampleWrapper status={this.state.code} methods={this.info.bind(this)} />
        <WingBlank>
          <Link to='/home/register' className="am-button" role="button" aria-disabled="false" style={{ color: "rgb(16,142,233)" }}>注册</Link>
        </WingBlank>
        <WhiteSpace />
      </div>
    )
  }
}
export default Login